<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
    <title>Click2Edit.com</title>
 
 <%= stylesheet_link_tag 'main' %>  
 
   
</head>
<body>
<font face="trebuchet ms">
    <div id="container">
      <div id="header">

<table>

<tr>
<td>
<font color="#005CB8"><b><font face="trebuchet ms" size="5">Admin site</font></b></font>
</td>
<td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>
<td align=right >
<%= image_tag("bifBOTka.png") %>
</td>
<td>
<%= "Hello " + User.find(session[:user_id]).name %>
</td>

<td>
<%= link_to("Sign Out",  {:controller => 'account',:action => 'logout'}) %>
</td>
				<td>
				<font  size="2">Current Alias: (<b><%= Ualia.find_by_iscurrent(true).name  %></b>)</font>
				</td>
				<td>
				<font  size="2">Default Website: (<b><%= Websitesinf.find_by_iscurrent(true).name  %></b>)</font>
				</td>
</tr>

</table>
</div>

<%= javascript_include_tag "application" %>

<% # Include TinyMCE before other JS to avoid problems -%>
<%= javascript_include_tiny_mce_if_used %>
<%= tiny_mce if using_tiny_mce? %> 

<%= javascript_include_tag :defaults %>
 <%= active_scaffold_includes %>
        <%= dhtml_calendar_includes %>

 



      <div id="sidemenu">
        <%= render :partial => 'layouts/menu' %>
      </div>
      <div id="content">
        <h3><%=@params[:varaaa]%></h3>
         <fieldset>

     <p>    Created date:
				From <%= calendar_box 'from', 'created_at',       
				 { :class => 'date',         
				 :date => '2008-10-10',        
				  :field_title => 'Birthday',        
				   :button_title => 'Show calendar' },      
				  { :firstDay => 1,         
				  :range => [2005, 2015],         
				  :step => 1,         
				  :showOthers => true,         
				  :cache => true }  %>
				  
				  				To <%= calendar_box 'to', 'created_at',       
				 { :class => 'date',         
				 :date => '2008-10-10',        
				  :field_title => 'Birthday',        
				   :button_title => 'Show calendar' },      
				  { :firstDay => 1,         
				  :range => [2005, 2015],         
				  :step => 1,         
				  :showOthers => true,         
				  :cache => true }  %>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Alias name:

					  		 <% options = [[as_('- select -'), '']]+Ualia.find(:all).collect do |c| 
		      [ c.name, c.name ] 
		    end 
		    %>
     <%= select_tag 'aliasn',options_for_select(options) %>
					
					    </p> 
					    
	  <p>Category 1:

        	 <% options1 = [[as_('- select -'), '']]+Category.find(:all,:conditions=>['categories.websitesinf_id = ?',@params[:id]]).collect do |c| 
		      [ c.name, c.id ] 
		    end  %>
                 <%= select_tag 'categoryn',options_for_select(options1) %>		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 			
		  Category 2:

               <% optionst1 = [[as_('- select -'), '']]+Categoryt.find(:all,:conditions=>['categoryts.websitesinf_id = ?',@params[:id]]).collect do |c|
                      [ c.name, c.id ]
                    end  %>
                 <%= select_tag 'categorytn',options_for_select(optionst1) %>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 
                      Tag:
                <%options2 = [[as_('- select -'), '']]+Tag.find(:all,:conditions=>['tags.websitesinf_id = ?',@params[:id]]).collect do |c|
                      [ c.name, c.id ]
                    end%>
             <%= select_tag 'tagn',options_for_select(options2) %>
                </p>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   <%=button_to_function 'query',:onclick =>"testdc();"%>

				  </fieldset>
        <% if flash[:notice] -%>
          <div id="notice"><%= flash[:notice] %></div>
        <% end -%>
        <% if flash[:error] -%>
          <div id="error"><%= flash[:error] %></div>
        <% end -%>
        <%= yield %>
      </div>
    </div>
  </body>
</font>  
</html>
<script language="javascript">

 function testdc()
 {
    
 		location.href="/websitearticles3/query_cond?id="+<%=params[:id]%>+"&from_created_at="+$('from_created_at').value+"&to_created_at="+$('to_created_at').value+"&aliasn="+$('aliasn').value+"&categoryn="+$('categoryn').value+"&categorytn="+$('categorytn').value+"&tagn="+$('tagn').value;

 }
 </script>